<template>
  <div class="add-point-item">
    <span>路径点{{ index + 1 }}</span>
    <el-button
      type="danger"
      icon="el-icon-delete"
      circle
      @click="deletePoint"
    ></el-button>
  </div>
</template>

<script>
export default {
  name: 'add-point-item',
  props: ['x', 'y', 'z', 'id', 'index'],
  methods: {
    deletePoint() {
      this.$emit('deletePoint', this.index)
    }
  }
}
</script>

<style lang="scss" scoped>
.add-point-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .el-button--danger {
    color: red;
    background-color: transparent;
    border-color: transparent;
  }

  span {
    font-size: 14px;
    color: white;
    padding: 4px 0;
  }
}
</style>
